<!DOCTYPE html>
<!--
Copyright 2016 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<link rel="import" href="/dashboard/elements/chart-legend-tooltip.html">
<link rel="import" href="/tracing/core/test_utils.html">

<script>
'use strict';

tr.b.unittest.testSuite(function() {
  const testOptions = {
    setUp() {
    },
    tearDown() {
    }
  };

  test('instantiate', function() {
    const legendTooltip = document.createElement('chart-legend-tooltip');
    legendTooltip.description = 'Amazing description.';
    legendTooltip.direction = 'Lower';
    legendTooltip.path = 'Master/bot/test.suite/metric';
    legendTooltip.units = 'us';

    const container = document.createElement('div');
    const text = document.createElement('span');
    Polymer.dom(text).textContent =
      'this_is_a_long_mertric_name';
    Polymer.dom(container).appendChild(text);
    Polymer.dom(container).appendChild(legendTooltip);

    this.addHTMLOutput(container);
    legendTooltip.$.info.click();
  }, testOptions);
});
</script>
